import Vue from 'vue';
import Router from 'vue-router';
import Login from '@/components/Login';
import HomePage from '@/components/HomePage';
import ExamList from '@/components/ExamList';//检查列表
import BackManage from '@/components/BackManage';//后台管理
import ReservationList from '@/components/ReservationList';//预约列表
import ExamAdd from '@/components/ExamAdd';//新增检查
import ExamUpload from '@/components/ExamUpload';//离线上传
import ExamSoftDown from '@/components/ExamSoftDown';//软件下载
import ExamStatistical from '@/components/ExamStatistical';//检查统计
import ExamTemplate from '@/components/ExamTemplate';//模板管理
import ExamCollect from '@/components/ExamCollect';//收藏管理
import ExamHelp from '@/components/ExamHelp';//使用帮助
// 后台管理模块路由
import ContactInformation from '@/components/manage/ContactInformation';//联系信息
import CreateWrokroom from '@/components/manage/CreateWrokroom';//我创建的
import JoinWorkroom from '@/components/manage/JoinWorkroom';//我加盟的
import MyCount from '@/components/manage/MyCount';//我的账号
import PersonalData from '@/components/manage/PersonalData';//个人资料
import SecuritySettings from '@/components/manage/SecuritySettings';//安全设置
import SystemConfiguration from '@/components/manage/SystemConfiguration';//系统配置
import UseStatistical from '@/components/manage/UseStatistical';//使用统计
import UseSubsidiary from '@/components/manage/UseSubsidiary';//使用明细
Vue.use(Router);
export default new Router({
  routes: [
    {
      path:'/',
      redirect:'login'
    },
    {
      path: '/login',
      component: Login,
      name: 'login'
  },

    {
      path: '/homepage',
      component: HomePage,
      name: 'homepage',
      children:[
        {
          path:'/',
          redirect:'/homepage/examlist'
        },
        {
          path: 'examlist',
          name: 'examlist',
          component: ExamList
        },
          {
            path: 'manage',
            name: 'manage',
            component: BackManage,
            redirect:'/homepage/manage/mycount',
            children:[
              {
                path:'mycount',
                name:'mycount',
                component:MyCount
              },
              {
                path:'cotact',
                name:'cotact',
                component:ContactInformation
              },
              {
                path:'create',
                name:'create',
                component:CreateWrokroom
              },
              {
                path:'join',
                name:'join',
                component:JoinWorkroom
              },
              {
                path:'person',
                name:'person',
                component:PersonalData
              },
              {
                path:'safe',
                name:'safe',
                component:SecuritySettings
              },
              {
                path:'system',
                name:'system',
                component:SystemConfiguration
              },
              {
                path:'usesta',
                name:'usesta',
                component:UseStatistical
              },
              {
                path:'usesub',
                name:'usesub',
                component:UseSubsidiary
              },
            ]
          }, {
            path: 'reser',
            name: 'reser',
            component: ReservationList
          }, {
            path: 'add',
            name: 'add',
            component: ExamAdd
          }, {
            path: 'upload',
            name: 'upload',
            component: ExamUpload
          }, {
            path: 'soft',
            name: 'soft',
            component: ExamSoftDown
          }, {
            path: 'statis',
            name: 'statis',
            component: ExamStatistical
          }, {
            path: 'template',
            name: 'template',
            component: ExamTemplate
          },
          {
            path: 'collect',
            name: 'collect',
            component: ExamCollect
          },
          {
            path: 'help',
            name: 'help',
            component: ExamHelp
          }
      ]
  },


  ],
});
